package com.lehecai.ucenter.entity.permission;

import com.lehecai.ucenter.entity.BaseEntity;


public class Permission extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6100412628585480536L;
	public static final String entityName = "Permission";
	public static final String entityAlias = "p";
	public static final String PARENT_ID_PROPERTY_NAME = "parentId";
	private String name;
	private String url;
	private Long parentId;
	private Integer orderView = 0;
	private String actionName;
	private String methodName;
	private String paramName;
	private String paramValue;
	private String memo;
	private boolean valid = true; //是否有效
	private boolean menuItem = true; //是否显示为菜单
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public boolean isValid() {
		return valid;
	}
	public void setValid(boolean valid) {
		this.valid = valid;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
	public Integer getOrderView() {
		if(orderView == null){
			orderView = 0;
		}
		return orderView;
	}
	public void setOrderView(Integer orderView) {
		this.orderView = orderView;
	}
	public String getActionName() {
		return actionName;
	}
	public void setActionName(String actionName) {
		this.actionName = actionName;
	}
	public String getMethodName() {
		return methodName;
	}
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	public String getParamName() {
		return paramName;
	}
	public void setParamName(String paramName) {
		this.paramName = paramName;
	}
	public String getParamValue() {
		return paramValue;
	}
	public void setParamValue(String paramValue) {
		this.paramValue = paramValue;
	}
	public boolean isMenuItem() {
		return menuItem;
	}
	public void setMenuItem(boolean menuItem) {
		this.menuItem = menuItem;
	}
	
	public boolean equals(Object obj){  
        Permission perm = (Permission)obj;
        boolean flag = false;
        if(perm.getId().longValue() == getId().longValue()){
        	flag = true;
        }
        return flag;  
    }  
}
